<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../struts_taglib.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>  
  <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  <title>药品/新增</title>
  <%@ include file="../link_script.jsp" %>
  <script type="text/javascript">
    $(function() { 
      $("form").validity(function() {
        $("#medicineName").require();
      });
    });
  </script>
</head>
<body> 
<form action="medicine.do?method=editMedicine_Do" method="post" target="_self">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <%@ include file="../operate_button_add.jsp" %>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="8" background="images/tab_12.gif">&nbsp;</td>
        <td><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#b5d6e6">       
          <tr>
            <td width="100%" class="STYLE32">编辑药品</td>
          </tr>
          <tr>
            <td class="STYLE1"><table width="100%" border="0" bordercolor="#b5d6e6" cellpadding="0" cellspacing="0">
              <tr>
                <td class="STYLE31" width="8%">&nbsp;&nbsp;药品名称 : </td>
                <td class="STYLE11"><input type="text" id="medicineName" name="medicineName" value="${medicine.medicineName }" size="30" title="药品名称不能为空" /></td>
              </tr>
              <tr>
                <td class="STYLE31" width="8%">&nbsp;&nbsp;生产厂家 : </td>
                <td class="STYLE11"><input type="text" id="manufacturer" name="manufacturer" value="${medicine.manufacturer }" size="30" /></td>
              </tr>
              <tr>
                <td class="STYLE31" width="8%">&nbsp;&nbsp;购买日期 : </td>
                <td class="STYLE11"><input type="text" id="medicineDate" name="medicineDate" value="${medicine.medicineDate }" size="10" />
               &nbsp;&nbsp;<font color="red">*</font>&nbsp;&nbsp; 购买日期，购买日期在结算时作为流水账的记账日期。</td>
              </tr>
              <tr>
                <td class="STYLE31" width="8%">&nbsp;&nbsp;有效期 : </td>
                <td class="STYLE11"><input type="text" id="validPeriod" name="validPeriod" value="${medicine.validPeriod }" size="10" /></td>
              </tr>
              <tr>
                <td class="STYLE31" width="8%">&nbsp;&nbsp;状态 :</td>
                <td class="STYLE11" >
                <select id="medicineState" name="medicineState">
                  <c:if test="${medicine.medicineState=='1'}"><option value="1">未完</c:if>
                  <c:if test="${medicine.medicineState=='0'}"><option value="0">用完</option></c:if>
                  <option value="无" disabled="disabled">------</option>
                  <option value="1">未完</option>      
                  <option value="0">用完</option>
                </select>
                </td>
              </tr>
              <tr>
                <td class="STYLE31" width="8%">&nbsp;&nbsp;费用: </td>
                <td class="STYLE11" ><input type="text" id="medicineExpense" name="medicineExpense" value="${medicine.medicineExpense }" size="10" readonly />&nbsp;￥</td>
              </tr> 
              <tr>
                <td class="STYLE31" width="8%">&nbsp;&nbsp;卖家 : </td>
                <td class="STYLE11">
                <select id ="shopID" name="shopID" onchange="javascript:change();">
                  <option value="${medicine.shop.shopID}">${medicine.shop.shopName}</option>
                  <option disabled="disabled">------</option>
                  <c:if test="${!empty shopList}">
                    <c:forEach items="${shopList}" var="s">
                      <option value="${s.shopID}">${s.shopName}</option>
                    </c:forEach></c:if></select></td>
              </tr>           
              <tr>
                <td class="STYLE31" width="8%">&nbsp;&nbsp;描述 : </td>
                <td class="STYLE11"><textarea id="medicineDesc" name="medicineDesc" cols="54" rows="4" style="font-family:宋体;font-size:12px">${medicine.medicineDesc }</textarea></td>
              </tr>
              <tr>
                <td class="STYLE31" width="8%">&nbsp;&nbsp;</td>
                <td class="STYLE11"><input type=hidden id="medicineID" name="medicineID" value="${medicine.medicineID }" /></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="20" class="STYLE12"><input type="submit" value="提交"/><input type="reset" value="取消"/></td>
          </tr>
        </table></td>
        <td width="8" background="images/tab_15.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <%@ include file="../no_page.jsp"%>
</table>
</form>
</body>
</html>
